package com.tomorrowbbs.domain.enums;

public enum ArticleStatusEnum {
    DEL(-1,"删除"),
    NO_AUDIT(0,"未审核"),
    AUDIT(1,"已审核");



    private Integer status;
    private String desc;

    ArticleStatusEnum(Integer status,String desc){
        this.status = status;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }
    public Integer getStatus() {
        return status;
    }

    public static ArticleStatusEnum getByStatus(Integer status){
        for(ArticleStatusEnum articleStatusEnum : ArticleStatusEnum.values()){
            if(articleStatusEnum.getStatus().equals(status)){
                return articleStatusEnum;
            }
        }
        return null;
    }
}
